package com.njcky;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.core.task.TaskExecutor;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;

@SpringBootApplication
//@MapperScan("com.njcky.mapper.**")
//@MapperScan({"org.springblade.**.mapper.**", "com.yutu.**.mapper.**"})
@MapperScan({"com.yutu.common.config.mapper"})
@Slf4j
public class Application {

    public static void main(String[] args) {
        //LogFactory.useCustomLogging(StdOutImpl.class);//打印sql日志
        SpringApplication.run(Application.class, args);
        log.info("Application start successfully ... ...");
    }
    @Primary
    @Bean
    public TaskExecutor primaryTaskExecutor() {
        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
        return executor;
    }
}
